Micron Document
`:top
In `F33f`_`[computer graphics`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_graphics]`_`f, the `!Cyrus–Beck algorithm`! is a generalized `F33f`_`[algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Algorithm]`_`f for `F33f`_`[line clipping`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Line_clipping]`_`f. It was designed to be more efficient than the `F33f`_`[Cohen–Sutherland algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cohen–Sutherland_algorithm]`_`f, which uses repetitive clipping.`:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f] Cyrus–Beck is a general algorithm and can be used with a `F33f`_`[convex polygon`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Convex_polygon]`_`f clipping window, unlike Cohen-Sutherland, which can be used only on a rectangular clipping area.

Here the `F33f`_`[parametric equation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Parametric_equation]`_`f of a line in the view plane is p ( t ) = t p 1 + ( 1 − − t ) p 0 {\\displaystyle \\mathbf {p} (t)=t\\mathbf {p} _{1}+(1-t)\\mathbf {p} _{0}} where 0 ≤ ≤ t ≤ ≤ 1 {\\displaystyle 0\\leq t\\leq 1} .

Now to find the intersection point with the clipping window, we calculate the value of the `F33f`_`[dot product`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Dot_product]`_`f. Let ⁠ p E {\\displaystyle \\mathbf {p} _{E}} ⁠ be a point on the clipping plane ⁠ E {\\displaystyle E} ⁠.

Calculate n ⋅ ⋅ ( p ( t ) − − p E ) {\\displaystyle \\mathbf {n} \\cdot (\\mathbf {p} (t)-\\mathbf {p} _{E})} :

• if < 0, vector pointed towards interior;
• if = 0, vector pointed parallel to plane containing ⁠ p {\\displaystyle p} ⁠;
• if > 0, vector pointed away from interior.

Here ⁠ n {\\displaystyle {\\mathbf {n}}} ⁠ stands for `F33f`_`[normal`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Normal_(geometry)]`_`f of the current clipping plane (pointed away from interior).

By this we select the point of intersection of line and clipping window where (dot product is 0) and hence clip the line.

>>Contents

• `F0af`_`[Notes`#notes]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
• `F0af`_`[External links`#external-links]`_`f

-─

>>Notes

`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f "Clipping" (presentation).

>>See also

Algorithms used for the same purpose:

• `F33f`_`[Cohen–Sutherland algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cohen–Sutherland_algorithm]`_`f
• `F33f`_`[Liang–Barsky algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Liang–Barsky_algorithm]`_`f
• `F33f`_`[Nicholl–Lee–Nicholl algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Nicholl–Lee–Nicholl_algorithm]`_`f
• `F33f`_`[Fast clipping`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Fast_clipping]`_`f

References in other media:

• `*`F33f`_`[Tron: Uprising`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Tron:_Uprising]`_`f`*

>>References

• Mike Cyrus, Jay Beck. "Generalized two- and three-dimensional clipping". Computers & Graphics, 1978: 23–28.
• James D. Foley. `*Computer graphics: principles and practice`*. Addison-Wesley Professional, 1996. p. 117.

>>External links

• https://web.archive.org/web/20101203041134/http://cs1.bradley.edu/public/jcm/cs535CyrusBeck.html
• https://web.archive.org/web/20110725233122/http://softsurfer.com/Archive/algorithm_0111/algorithm_0111.htm

`c`F0af`_`[↑ Back to top`#top]`_`f`a